﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="OrderAdd.aspx.cs" Inherits="CustomersWithOrders.OrderAdd" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ValidationSummary ID="ValidationSummary1" runat="server" ForeColor="Red" />
        <table>
            <tr>
                <td>Order number:</td>
                <td>
                    <asp:TextBox ID="txtOrderNumber" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtOrderNumber" ErrorMessage="Set number" ForeColor="Red" Display="Dynamic">*</asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtOrderNumber" ErrorMessage="Order number must be 4 digits integer " ForeColor="Red" ValidationExpression="\d{4}"></asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td>Order date:</td>
                <td>
                    <asp:TextBox ID="txtOrderDate" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtOrderDate" ErrorMessage="Set date" ForeColor="Red" Display="Dynamic">*</asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="txtOrderDate" ErrorMessage="Date in format dd-mm-yyyy" ForeColor="Red" ValidationExpression="\d{2}-\d{2}-\d{4}"></asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td>Amount:</td>
                <td>
                    <asp:TextBox ID="txtAmount" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtAmount" ErrorMessage="Set amount" ForeColor="Red" Display="Dynamic">*</asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" ControlToValidate="txtAmount" ErrorMessage="Amount must be integer value" ForeColor="Red" ValidationExpression="\d"></asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td>Description:</td>
                <td>
                    <asp:TextBox ID="txtDescription" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Button ID="btnSave" runat="server" Text="Save" OnClick="btnSave_Click" />

                </td>
                <td>
                    <asp:Button ID="btnCancel" runat="server" Text="Cancel" OnClick="btnCancel_Click" CauseValidation="false" />

                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
